<html>
    <head>
    	<meta charset="utf-8">
    	<title>百度输入法</title>
    	<style type="text/css">
	    	#box{width: 150px;margin: 0 auto; height: 150px;}
            ul{height: 80px; width: 56px; border: 1px solid #9A99FF;margin: 0px; padding: 0px; text-align: center;display: none;}
            ul li{list-style: none; font-size: 14px; line-height: 25px;}
            ul li a{text-decoration: none;}
            #gb{border-top: 1px solid #9A99FF};
    	</style>
    </head>
    <body>
    	<div id="box">
    		<input type="button" value="输入法" id="btn">
            <ul id="ime">
                <li><a href="javascript:;">手写</a></li>
                <li><a href="javascript:;">拼音</a></li>
                <li id="gb"><a href="javascript:;">关闭</a></li>
            </ul>
    	</div>
    </body>
    <script type="text/javascript">
        window.onload=function  () {
            var obtn=document.getElementById('btn');
            var oul=document.getElementById('ime');
            var ogb=document.getElementById('gb');
            var tf=true;
            obtn.onclick=function(){
                if(tf){
                    oul.style.display="block";
                    tf=false;
                }else{
                    oul.style.display="none";
                    tf=true;
                }
                
            }
            ogb.onclick=function(){
                oul.style.display="none";
            }
        }
    </script>
</html>